/*
 * @Author: jswang
 * @Date: 2021-07-25 23:05:15
 * @LastEditTime: 2021-07-29 09:14:13
 */
import Cookies from 'js-cookie'

const TokenKey = 'hrsaas-ihrm-token' //设置一个唯一的key
const TimeKey = 'hrsaas-timestamp-key' //设置一个唯一的时间戳key

//获取token
export function getToken() {
    return Cookies.get(TokenKey)
}
//保存token
export function setToken(token) {
    return Cookies.set(TokenKey, token)
}
//删除token
export function removeToken() {
    return Cookies.remove(TokenKey)
}

//获取时间戳
export function getTimestamp() {
    return Cookies.get(TimeKey)
}

//设置时间戳
export function setTimestamp() {
    return Cookies.set(TimeKey, Date.now())
}